Mediation models are common in substance use and HIV prevention and treatment research. Mediation occurs when an independent variable (e.g. substance use prevention program) has an effect on the dependent variable (e.g. substance use) through a third variable (e.g. resistance skills). Mediation analysis Is Important In substance use and HIV research because It can be used to test theories underlying Interventions;as a way of increasing understanding about how interventions work;and as a method for exploring data to Identify mediation pathways that can inform the development of future interventions. Traditional methods for assessing mediation can enable valid causal Inferences between the independent variable and the mediator variable but not between the mediator and the dependent variable because individuals are not randomly assigned to levels of the mediator. Although new methods for causal inference based on potential outcomes have been developed in the statistical literature, they have not been translated and Implemented in prevention and treatment research. This scientific project proposes to examine the feasibility of new methods for drawing causal Inferences In mediation models of substance use and HIV Interventions, particularly in the presence of moderating variables. Using simulation studies, the new methods will be compared with the traditional methods to determine whether they are an improvement over the traditional methods. We will also extend these methods to study non-randomized Interventions and apply them to data with a multilevel nested structure. The new methods will then be applied to a secondary data analysis of a randomized substance use prevention program for adolescents and to a non-randomized study of women with HIV. The new methods will be implemented in software programs and macros, which will be made available free of charge. Methods and findings will ultimately inform the design of more cost-effective Interventions for substance use and HIV prevention and treatment by allowing prevention and treatment scientists to draw more valid causal inferences when conducting mediation analyses.